package cn.gov.pbc.gd.credit.core.service;

public enum CenterType {
	/**
	 * 证件类型：0-身份证，1-户口簿，2-护照，3-军官证，4-士兵证，5-港澳居民来往内地通行证，6-台湾同胞来往内地通行证
	 *          7-临时身份证，8-外国人居留证，9-警官证，A-香港身份证&B-澳门身份证&C-台湾身份证&X-其它证件
	 */
	cardType0("0","身份证"),
	cardType1("1","户口簿"),
	cardType2("2","护照"),
	cardType3("3","军官证"),
	cardType4("4","士兵证"),
	cardType5("5","港澳居民来往内地通行证"),
	cardType6("6","台湾同胞来往内地通行证"),
	cardType7("7","临时身份证"),
	cardType8("8","外国人居留证"),
	cardType9("9","警官证"),
	cardTypeA("A","香港身份证"),
	cardTypeB("B","澳门身份证"),
	cardTypeC("C","台湾身份证"),
	cardTypeX("X","其它证件"),
	queryType21("21", "个人简单版"),
	queryType24("24", "个人详细版");
	
	private String code;  
    private String name;  
	
    private CenterType(String code, String  name) {
		this.code = code;
		this.name = name;
	}
	
    // 普通方法  
    public static String getName(String code) {  
        for (CenterType c : CenterType.values()) {  
            if (c.code.equals(code)) {  
                return c.name;  
            }  
        }  
        return null;  
    }  
	
	public void setName(String name) {  
        this.name = name;  
    }

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	} 
}
